Skip to content

refactor: rename label workflows and add generic uniqueness enforcement#189

Merged
EMaher merged 15 commits into
mainfrom
emaher-rename-and-enforce-labels
Jun 27, 2026
Merged

refactor: rename label workflows and add generic uniqueness enforcement#189
EMaher merged 15 commits into
mainfrom
emaher-rename-and-enforce-labels

Conversation

@EMaher

@EMaher EMaher commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces significant improvements to GitHub label management workflows, modernizes action versions, and refines label automation infrastructure. The main focus is on enforcing label uniqueness, migrating legacy labels, expanding label types, and updating dependencies for better maintainability and compatibility.

Label management and automation enhancements:

  • Added .github/workflows/issue-labels-enforce-unique.yml to enforce that only one label per category (e.g., type:) can be applied to an issue, with exceptions for squad: labels. The workflow determines which label to keep based on the order in issue-labels-sync.yml and removes any conflicting labels, commenting on the resolution.
  • Introduced .github/workflows/issue-labels-migrate.yml to automate migration of legacy labels (like bug, question, enhancement, documentation) to their canonical type: equivalents, handling renaming, relabeling, and cleanup.
  • Expanded and reorganized label definitions in .github/workflows/issue-labels-sync.yml (renamed from sync-squad-labels.yml): added new close: labels (e.g., close:fixed, close:wont-fix), ensured all type: labels are present and properly ordered, and removed legacy label definitions from high-signal labels. (Must by manually triggered)

Dependency and workflow modernization:

  • Updated all GitHub Actions (actions/checkout, actions/setup-node, actions/github-script) to their latest major versions (v6 or v8) across all workflow files for improved security and compatibility.

Motivation

The label management workflows had hard-coded per-category enforcement logic and naming that didn't reflect their broader purpose. Additionally, legacy GitHub default labels (bug, question, enhancement, documentation) duplicated our type:* labels, causing confusion. We also lacked a close: category to track issue closure reasons.

Notes

  • The enforce workflow reads the sync file at runtime to determine priority ordering -- no hard-coded category lists to maintain
  • Workflow chaining (running enforce before squad-issue-assign.yml) is deferred; it requires artifact passing for the event payload
  • Updated 3 documentation files that referenced the old workflow filenames

EMaher and others added 15 commits June 26, 2026 14:35
- Rename sync-squad-labels.yml → issue-labels-sync.yml
- Delete squad-label-enforce.yml (hardcoded per-category logic)
- Add issue-labels-enforce-unique.yml: generic enforcement for any
  category:value labels, reads sync file for priority ordering,
  exempts squad:* labels
- Update doc references in 3 files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ation

- Add CLOSE_LABELS: close:fixed, close:wont-fix, close:duplicate,
  close:question-answered
- Add type:enhancement to TYPE_LABELS
- Remove standalone 'bug' from SIGNAL_LABELS (replaced by type:bug)
- Add migration step to rename legacy labels (bug, question, enhancement)
  to their type: equivalents — rename preserves issue associations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extracts migration logic into issue-labels-migrate.yml (runs daily at
07:00 UTC). Removes migration from issue-labels-sync.yml.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the repository’s GitHub label automation by renaming and expanding the label sync workflow, adding new workflows for legacy-label migration and category uniqueness enforcement, and modernizing several existing workflows’ action versions.

Changes:

  • Added new workflows to (1) migrate legacy GitHub default labels to canonical type:* labels and (2) enforce “one label per category: prefix” (excluding squad:*).
  • Expanded/reordered label definitions in issue-labels-sync.yml, including new close:* labels and a reorganized type:* set.
  • Updated multiple workflows to newer major versions of common actions.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.squad/templates/squad.agent.md.template Updates workflow filename references from legacy sync workflow name to issue-labels-sync.yml.
.squad/templates/skills/init-mode/SKILL.md Same doc/reference update for init-mode skill template.
.copilot/skills/init-mode/SKILL.md Same doc/reference update for Copilot init-mode skill.
.github/workflows/squad-release.yml Bumps checkout/node setup action versions for the release workflow.
.github/workflows/squad-preview.yml Bumps checkout/node setup action versions for the preview validation workflow.
.github/workflows/squad-label-enforce.yml Removes the legacy label-enforcement workflow (previously contained exclusivity + go/release side effects).
.github/workflows/squad-issue-assign.yml Updates checkout version and keeps github-script on v8 while assigning/routing issues.
.github/workflows/squad-heartbeat.yml Updates checkout and github-script versions used by the heartbeat/triage automation.
.github/workflows/issue-labels-sync.yml Renames/updates label sync to include close:*, reorganize type:*, and modernize actions.
.github/workflows/issue-labels-migrate.yml Adds workflow_dispatch label migration for legacy default labels → type:*.
.github/workflows/issue-labels-enforce-unique.yml Adds generic uniqueness enforcement for category:value labels (excludes squad:*).
.github/workflows/codeql.yml Updates checkout version used in CodeQL workflow.
.github/workflows/ci.yml Updates checkout/node setup action versions for CI.
Comments suppressed due to low confidence (1)

.github/workflows/issue-labels-sync.yml:21

  • actions/checkout@v6 is not a valid major version for this action; update to a released major (e.g., v7) to avoid workflow failures.

Comment thread .github/workflows/issue-labels-enforce-unique.yml
@EMaher EMaher self-assigned this Jun 26, 2026
@EMaher EMaher requested a review from petehauge June 26, 2026 23:19
@EMaher EMaher marked this pull request as ready for review June 26, 2026 23:20
@EMaher EMaher merged commit 67e8786 into main Jun 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants